package com.goudan.demo.entity.valid;

import com.goudan.demo.entity.User;
import com.goudan.demo.util.ValidGroup;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Data
public class ValidationParam {

    @NotBlank(message = "用户名不能为空")
    private String username;

    @NotNull(message = "手机号不能为空！")
    private Integer phone;

    @NotBlank(message = "身份证不能为空", groups = ValidGroup.Update.class)
    private String idCard;

    @NotNull(message = "用户信息不能为空")
    @Valid
    private User user;
}
